﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GamePlay.aspx.cs" Inherits="_2011DBProject.GamePlay" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link rel=StyleSheet HREF='design1.css' type='text/css'>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>새벽 골프</title>
    <style type="text/css">
        .style1
        {
            height: 158px;
        }
        .style2
        {
            height: 487px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p align =left>
        <asp:Button ID="btnGoLogout" runat="server" onclick="btnGoLogout_onclick" 
            Text="☜ 로 그 아 웃" Width="150px" />
        <asp:Button ID="btnGoServer" runat="server" onclick="btnGoServer_onclick" 
            Text="☜ 서 버 선 택" Width="150px" />
        <asp:Button ID="btnGoCharacter" runat="server" onclick="btnGoCharacter_onclick" 
            Text="☜ 캐 릭 선 택" Width="150px" />
        <asp:Button ID="btnGoChannel" runat="server" onclick="btnGoChannel_onclick" 
            Text="☜ 채 널 선 택" Width="150px" />
        <asp:Button ID="btnGoMain" runat="server" onclick="btnGoMain_onclick" 
            Text="☜ 메 인 화 면" Width="150px" />
        </p>

        <table style="width:100%;">
            <tr>
                <td class="style1">
                    게임방 입장상태<br />
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        DataKeyNames="CHARACTER_NAME" 
                        DataSourceID="sqldsGameroomEntranceStatus" 
                        EmptyDataText="There are no data records to display." AllowPaging="True" 
                        onselectedindexchanged="GridView1_SelectedIndexChanged" HorizontalAlign="Center">
                        <Columns>
                            <asp:CommandField ShowSelectButton="True" />
                            <asp:BoundField DataField="CHARACTER_NAME" HeaderText="CHARACTER_NAME" 
                                ReadOnly="True" SortExpression="CHARACTER_NAME" />
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqldsGameroomEntranceStatus" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM &quot;GAMEROOM_ENTRANCE_STATUS&quot; WHERE &quot;CHANNEL_NO&quot; = :CHANNEL_NO AND &quot;SERVER_NO&quot; = :SERVER_NO AND &quot;GAMEROOM_NO&quot; = :GAMEROOM_NO AND &quot;CHARACTER_NAME&quot; = :CHARACTER_NAME" 
                        InsertCommand="INSERT INTO &quot;GAMEROOM_ENTRANCE_STATUS&quot; (&quot;CHANNEL_NO&quot;, &quot;SERVER_NO&quot;, &quot;GAMEROOM_NO&quot;, &quot;CHARACTER_NAME&quot;) VALUES (:CHANNEL_NO, :SERVER_NO, :GAMEROOM_NO, :CHARACTER_NAME)" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT &quot;CHANNEL_NO&quot;, &quot;SERVER_NO&quot;, &quot;GAMEROOM_NO&quot;, &quot;CHARACTER_NAME&quot; FROM &quot;GAMEROOM_ENTRANCE_STATUS&quot; WHERE ((&quot;SERVER_NO&quot; = :SERVER_NO) AND (&quot;GAMEROOM_NO&quot; = :GAMEROOM_NO) AND (&quot;CHANNEL_NO&quot; = :CHANNEL_NO))">
                        <SelectParameters>
                            <asp:SessionParameter Name="SERVER_NO" SessionField="SERVER" Type="Decimal" />
                            <asp:SessionParameter Name="GAMEROOM_NO" SessionField="GAMEROOM_NO" 
                                Type="Decimal" />
                            <asp:SessionParameter Name="CHANNEL_NO" SessionField="Ch" Type="Decimal" />
                        </SelectParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                        </InsertParameters>
                    </asp:SqlDataSource>
                    <br />
                    <br />
                    <asp:Label ID="lblMember" runat="server" Text="선택된 멤버가 없습니다."></asp:Label>
                    <br />
                    <br />
                    <asp:TextBox ID="txtMessage" runat="server"></asp:TextBox>
&nbsp;<asp:Button ID="btnMessage" runat="server" onclick="btnMessage_Click" Text="쪽지 보내기" />
                </td>
                <td class="style1">
                    스코어카드<br />
                    <br />
                    <asp:GridView ID="GridView3" runat="server" AllowPaging="True" 
                        AllowSorting="True" AutoGenerateColumns="False" BackColor="#DEBA84" 
                        BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                        CellSpacing="2" 
                        DataKeyNames="CHANNEL_NO,CHARACTER_NAME,SERVER_NO,COURSE_NO,GAMEROOM_NO,HOLE_NO" 
                        DataSourceID="sqldsScorecard" 
                        EmptyDataText="There are no data records to display.">
                        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                        <Columns>
                            <asp:BoundField DataField="CHANNEL_NO" HeaderText="CHANNEL_NO" ReadOnly="True" 
                                SortExpression="CHANNEL_NO" />
                            <asp:BoundField DataField="CHARACTER_NAME" HeaderText="CHARACTER_NAME" 
                                ReadOnly="True" SortExpression="CHARACTER_NAME" />
                            <asp:BoundField DataField="SERVER_NO" HeaderText="SERVER_NO" ReadOnly="True" 
                                SortExpression="SERVER_NO" />
                            <asp:BoundField DataField="COURSE_NO" HeaderText="COURSE_NO" ReadOnly="True" 
                                SortExpression="COURSE_NO" />
                            <asp:BoundField DataField="GAMEROOM_NO" HeaderText="GAMEROOM_NO" 
                                ReadOnly="True" SortExpression="GAMEROOM_NO" />
                            <asp:BoundField DataField="HOLE_NO" HeaderText="HOLE_NO" ReadOnly="True" 
                                SortExpression="HOLE_NO" />
                            <asp:BoundField DataField="SCORE" HeaderText="SCORE" SortExpression="SCORE" />
                            <asp:BoundField DataField="VICTORY" HeaderText="VICTORY" 
                                SortExpression="VICTORY" />
                        </Columns>
                        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqldsScorecard" runat="server" 
                        ConflictDetection="CompareAllValues" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM &quot;SCORECARD&quot; WHERE &quot;CHANNEL_NO&quot; = :original_CHANNEL_NO AND &quot;CHARACTER_NAME&quot; = :original_CHARACTER_NAME AND &quot;SERVER_NO&quot; = :original_SERVER_NO AND &quot;COURSE_NO&quot; = :original_COURSE_NO AND &quot;GAMEROOM_NO&quot; = :original_GAMEROOM_NO AND &quot;HOLE_NO&quot; = :original_HOLE_NO AND ((&quot;SCORE&quot; = :original_SCORE) OR (&quot;SCORE&quot; IS NULL AND :original_SCORE IS NULL)) AND ((&quot;VICTORY&quot; = :original_VICTORY) OR (&quot;VICTORY&quot; IS NULL AND :original_VICTORY IS NULL))" 
                        InsertCommand="INSERT INTO &quot;SCORECARD&quot; (&quot;CHANNEL_NO&quot;, &quot;CHARACTER_NAME&quot;, &quot;SERVER_NO&quot;, &quot;COURSE_NO&quot;, &quot;GAMEROOM_NO&quot;, &quot;HOLE_NO&quot;, &quot;SCORE&quot;, &quot;VICTORY&quot;) VALUES (:CHANNEL_NO, :CHARACTER_NAME, :SERVER_NO, :COURSE_NO, :GAMEROOM_NO, :HOLE_NO, :SCORE, :VICTORY)" 
                        OldValuesParameterFormatString="original_{0}" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT &quot;CHANNEL_NO&quot;, &quot;CHARACTER_NAME&quot;, &quot;SERVER_NO&quot;, &quot;COURSE_NO&quot;, &quot;GAMEROOM_NO&quot;, &quot;HOLE_NO&quot;, &quot;SCORE&quot;, &quot;VICTORY&quot; FROM &quot;SCORECARD&quot; WHERE ((&quot;CHANNEL_NO&quot; = :CHANNEL_NO) AND (&quot;GAMEROOM_NO&quot; = :GAMEROOM_NO) AND (&quot;SERVER_NO&quot; = :SERVER_NO))" 
                        UpdateCommand="UPDATE &quot;SCORECARD&quot; SET &quot;SCORE&quot; = :SCORE, &quot;VICTORY&quot; = :VICTORY WHERE &quot;CHANNEL_NO&quot; = :original_CHANNEL_NO AND &quot;CHARACTER_NAME&quot; = :original_CHARACTER_NAME AND &quot;SERVER_NO&quot; = :original_SERVER_NO AND &quot;COURSE_NO&quot; = :original_COURSE_NO AND &quot;GAMEROOM_NO&quot; = :original_GAMEROOM_NO AND &quot;HOLE_NO&quot; = :original_HOLE_NO AND ((&quot;SCORE&quot; = :original_SCORE) OR (&quot;SCORE&quot; IS NULL AND :original_SCORE IS NULL)) AND ((&quot;VICTORY&quot; = :original_VICTORY) OR (&quot;VICTORY&quot; IS NULL AND :original_VICTORY IS NULL))">
                        <SelectParameters>
                            <asp:SessionParameter Name="CHANNEL_NO" SessionField="Ch" Type="Decimal" />
                            <asp:SessionParameter Name="GAMEROOM_NO" SessionField="GAMEROOM_NO" 
                                Type="Decimal" />
                            <asp:SessionParameter Name="SERVER_NO" SessionField="SERVER" Type="Decimal" />
                        </SelectParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="original_CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="original_SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="original_COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_SCORE" Type="Decimal" />
                            <asp:Parameter Name="original_VICTORY" Type="String" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="HOLE_NO" Type="Decimal" />
                            <asp:Parameter Name="SCORE" Type="Decimal" />
                            <asp:Parameter Name="VICTORY" Type="String" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="SCORE" Type="Decimal" />
                            <asp:Parameter Name="VICTORY" Type="String" />
                            <asp:Parameter Name="original_CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="original_SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="original_COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_SCORE" Type="Decimal" />
                            <asp:Parameter Name="original_VICTORY" Type="String" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                </td>
                <td class="style1">
                </td>
            </tr>
            <tr>
                <td class="style2">
                    대화<br />
                    <asp:GridView ID="gvConversationCh" runat="server" AllowPaging="True" AutoGenerateColumns="False" 
                        DataKeyNames="CHARACTER_NAME,SERVER_NO,CONVERSATION_NO,CHANNEL_NO,GAMEROOM_NO" 
                        DataSourceID="sqldsConversation" 
                        EmptyDataText="There are no data records to display.">
                        <Columns>
                            <asp:BoundField DataField="CHARACTER_NAME" HeaderText="말한캐릭터" 
                                ReadOnly="True" SortExpression="CHARACTER_NAME" />
                            <asp:BoundField ControlStyle-Width="300" DataField="CONTENT" HeaderText="대화내용" 
                                SortExpression="CONTENT" />
                            <asp:BoundField DataField="CONVERSATION_DATETIME" 
                                HeaderText="말한시각" SortExpression="CONVERSATION_DATETIME" />
                            <asp:BoundField DataField="SERVER_NO" HeaderText="SERVER_NO" ReadOnly="True" 
                                SortExpression="SERVER_NO" Visible="False" />
                            <asp:BoundField DataField="CONVERSATION_NO" HeaderText="CONVERSATION_NO" 
                                ReadOnly="True" SortExpression="CONVERSATION_NO" Visible="False" />
                            <asp:BoundField DataField="CHANNEL_GUILD_CAT" HeaderText="CHANNEL_GUILD_CAT" 
                                SortExpression="CHANNEL_GUILD_CAT" Visible="False" />
                            <asp:BoundField DataField="CHANNEL_NO" HeaderText="CHANNEL_NO" ReadOnly="True" 
                                SortExpression="CHANNEL_NO" Visible="False" />
                            <asp:BoundField DataField="GAMEROOM_NO" HeaderText="GAMEROOM_NO" 
                                ReadOnly="True" SortExpression="GAMEROOM_NO" Visible="False" />
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqldsConversation" runat="server" 
                        ConflictDetection="CompareAllValues" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM &quot;CONVERSATION&quot; WHERE &quot;CHARACTER_NAME&quot; = :original_CHARACTER_NAME AND &quot;SERVER_NO&quot; = :original_SERVER_NO AND &quot;CONVERSATION_NO&quot; = :original_CONVERSATION_NO AND &quot;CHANNEL_NO&quot; = :original_CHANNEL_NO AND &quot;GAMEROOM_NO&quot; = :original_GAMEROOM_NO AND ((&quot;CONTENT&quot; = :original_CONTENT) OR (&quot;CONTENT&quot; IS NULL AND :original_CONTENT IS NULL)) AND ((&quot;CONVERSATION_DATETIME&quot; = :original_CONVERSATION_DATETIME) OR (&quot;CONVERSATION_DATETIME&quot; IS NULL AND :original_CONVERSATION_DATETIME IS NULL)) AND ((&quot;CHANNEL_GUILD_CAT&quot; = :original_CHANNEL_GUILD_CAT) OR (&quot;CHANNEL_GUILD_CAT&quot; IS NULL AND :original_CHANNEL_GUILD_CAT IS NULL))" 
                        InsertCommand="INSERT INTO &quot;CONVERSATION&quot; (&quot;CHARACTER_NAME&quot;, &quot;CONTENT&quot;, &quot;CONVERSATION_DATETIME&quot;, &quot;SERVER_NO&quot;, &quot;CONVERSATION_NO&quot;, &quot;CHANNEL_GUILD_CAT&quot;, &quot;CHANNEL_NO&quot;, &quot;GAMEROOM_NO&quot;) VALUES (:CHARACTER_NAME, :CONTENT, :CONVERSATION_DATETIME, :SERVER_NO, :CONVERSATION_NO, :CHANNEL_GUILD_CAT, :CHANNEL_NO, :GAMEROOM_NO)" 
                        OldValuesParameterFormatString="original_{0}" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT CHARACTER_NAME, CONTENT, CONVERSATION_DATETIME, SERVER_NO, CONVERSATION_NO, CHANNEL_GUILD_CAT, CHANNEL_NO, GAMEROOM_NO FROM CONVERSATION WHERE (CHANNEL_NO = :CHANNEL_NO) AND (SERVER_NO = :SERVER_NO) AND (GAMEROOM_NO = :GAMEROOM_NO) AND (GAMEROOM_NO &lt;&gt; 0) ORDER BY CONVERSATION_DATETIME DESC" 
                        
                        
                        UpdateCommand="UPDATE &quot;CONVERSATION&quot; SET &quot;CONTENT&quot; = :CONTENT, &quot;CONVERSATION_DATETIME&quot; = :CONVERSATION_DATETIME, &quot;CHANNEL_GUILD_CAT&quot; = :CHANNEL_GUILD_CAT WHERE &quot;CHARACTER_NAME&quot; = :original_CHARACTER_NAME AND &quot;SERVER_NO&quot; = :original_SERVER_NO AND &quot;CONVERSATION_NO&quot; = :original_CONVERSATION_NO AND &quot;CHANNEL_NO&quot; = :original_CHANNEL_NO AND &quot;GAMEROOM_NO&quot; = :original_GAMEROOM_NO AND ((&quot;CONTENT&quot; = :original_CONTENT) OR (&quot;CONTENT&quot; IS NULL AND :original_CONTENT IS NULL)) AND ((&quot;CONVERSATION_DATETIME&quot; = :original_CONVERSATION_DATETIME) OR (&quot;CONVERSATION_DATETIME&quot; IS NULL AND :original_CONVERSATION_DATETIME IS NULL)) AND ((&quot;CHANNEL_GUILD_CAT&quot; = :original_CHANNEL_GUILD_CAT) OR (&quot;CHANNEL_GUILD_CAT&quot; IS NULL AND :original_CHANNEL_GUILD_CAT IS NULL))">
                        <SelectParameters>
                            <asp:SessionParameter Name="CHANNEL_NO" SessionField="Ch" Type="Decimal" />
                            <asp:SessionParameter Name="SERVER_NO" SessionField="SERVER" Type="Decimal" />
                            <asp:SessionParameter Name="GAMEROOM_NO" SessionField="GAMEROOM_NO" 
                                Type="Decimal" />
                        </SelectParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="original_CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="original_SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CONVERSATION_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="original_GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CONTENT" Type="String" />
                            <asp:Parameter Name="original_CONVERSATION_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="original_CHANNEL_GUILD_CAT" Type="Decimal" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="CONTENT" Type="String" />
                            <asp:Parameter Name="CONVERSATION_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="CONVERSATION_NO" Type="Decimal" />
                            <asp:Parameter Name="CHANNEL_GUILD_CAT" Type="Decimal" />
                            <asp:Parameter Name="CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="GAMEROOM_NO" Type="Decimal" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="CONTENT" Type="String" />
                            <asp:Parameter Name="CONVERSATION_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="CHANNEL_GUILD_CAT" Type="Decimal" />
                            <asp:Parameter Name="original_CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="original_SERVER_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CONVERSATION_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CHANNEL_NO" Type="Decimal" />
                            <asp:Parameter Name="original_GAMEROOM_NO" Type="Decimal" />
                            <asp:Parameter Name="original_CONTENT" Type="String" />
                            <asp:Parameter Name="original_CONVERSATION_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="original_CHANNEL_GUILD_CAT" Type="Decimal" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <br />
                    <asp:Label ID="Label8" runat="server" Text="대화창"></asp:Label>
&nbsp;
                    <asp:TextBox ID="txtChat" runat="server" Width="363px"></asp:TextBox>
&nbsp;
                    <asp:Button ID="btnChat" runat="server" onclick="btnChat_Click" Text="대화하기" />
                    <br />
                    <br />
                    <br />
                </td>
                <td rowspan="2">
                    코스<br />
                    <br />
                    <asp:GridView ID="GridView4" runat="server" AllowPaging="True" 
                        AllowSorting="True" AutoGenerateColumns="False" BackColor="#DEBA84" 
                        BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                        CellSpacing="2" DataKeyNames="COURSE_NO" DataSourceID="sqldsCourse" 
                        EmptyDataText="There are no data records to display.">
                        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                        <Columns>
                            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                                ShowSelectButton="True" />
                            <asp:BoundField DataField="COURSE_NAME" HeaderText="COURSE_NAME" 
                                SortExpression="COURSE_NAME" />
                            <asp:BoundField DataField="COURSE_DIFFICULTY" HeaderText="COURSE_DIFFICULTY" 
                                SortExpression="COURSE_DIFFICULTY" />
                            <asp:BoundField DataField="HOLE_QTY" HeaderText="HOLE_QTY" 
                                SortExpression="HOLE_QTY" />
                            <asp:BoundField DataField="COURSE_NO" HeaderText="COURSE_NO" ReadOnly="True" 
                                SortExpression="COURSE_NO" />
                        </Columns>
                        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqldsCourse" runat="server" 
                        ConflictDetection="CompareAllValues" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM &quot;COURSE&quot; WHERE &quot;COURSE_NO&quot; = :original_COURSE_NO AND ((&quot;COURSE_NAME&quot; = :original_COURSE_NAME) OR (&quot;COURSE_NAME&quot; IS NULL AND :original_COURSE_NAME IS NULL)) AND ((&quot;COURSE_DIFFICULTY&quot; = :original_COURSE_DIFFICULTY) OR (&quot;COURSE_DIFFICULTY&quot; IS NULL AND :original_COURSE_DIFFICULTY IS NULL)) AND ((&quot;HOLE_QTY&quot; = :original_HOLE_QTY) OR (&quot;HOLE_QTY&quot; IS NULL AND :original_HOLE_QTY IS NULL))" 
                        InsertCommand="INSERT INTO &quot;COURSE&quot; (&quot;COURSE_NAME&quot;, &quot;COURSE_DIFFICULTY&quot;, &quot;HOLE_QTY&quot;, &quot;COURSE_NO&quot;) VALUES (:COURSE_NAME, :COURSE_DIFFICULTY, :HOLE_QTY, :COURSE_NO)" 
                        OldValuesParameterFormatString="original_{0}" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT &quot;COURSE_NAME&quot;, &quot;COURSE_DIFFICULTY&quot;, &quot;HOLE_QTY&quot;, &quot;COURSE_NO&quot; FROM &quot;COURSE&quot;" 
                        UpdateCommand="UPDATE &quot;COURSE&quot; SET &quot;COURSE_NAME&quot; = :COURSE_NAME, &quot;COURSE_DIFFICULTY&quot; = :COURSE_DIFFICULTY, &quot;HOLE_QTY&quot; = :HOLE_QTY WHERE &quot;COURSE_NO&quot; = :original_COURSE_NO AND ((&quot;COURSE_NAME&quot; = :original_COURSE_NAME) OR (&quot;COURSE_NAME&quot; IS NULL AND :original_COURSE_NAME IS NULL)) AND ((&quot;COURSE_DIFFICULTY&quot; = :original_COURSE_DIFFICULTY) OR (&quot;COURSE_DIFFICULTY&quot; IS NULL AND :original_COURSE_DIFFICULTY IS NULL)) AND ((&quot;HOLE_QTY&quot; = :original_HOLE_QTY) OR (&quot;HOLE_QTY&quot; IS NULL AND :original_HOLE_QTY IS NULL))">
                        <DeleteParameters>
                            <asp:Parameter Name="original_COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_COURSE_NAME" Type="String" />
                            <asp:Parameter Name="original_COURSE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_QTY" Type="Decimal" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="COURSE_NAME" Type="String" />
                            <asp:Parameter Name="COURSE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="HOLE_QTY" Type="Decimal" />
                            <asp:Parameter Name="COURSE_NO" Type="Decimal" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="COURSE_NAME" Type="String" />
                            <asp:Parameter Name="COURSE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="HOLE_QTY" Type="Decimal" />
                            <asp:Parameter Name="original_COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_COURSE_NAME" Type="String" />
                            <asp:Parameter Name="original_COURSE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_QTY" Type="Decimal" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <br />
                    홀<br />
                    <br />
                    <asp:GridView ID="GridView5" runat="server" AllowPaging="True" 
                        AllowSorting="True" AutoGenerateColumns="False" BackColor="#DEBA84" 
                        BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                        CellSpacing="2" DataKeyNames="COURSE_NO,HOLE_NO" DataSourceID="sqldsHole" 
                        EmptyDataText="There are no data records to display.">
                        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                        <Columns>
                            <asp:BoundField DataField="HOLE_NAME" HeaderText="HOLE_NAME" 
                                SortExpression="HOLE_NAME" />
                            <asp:BoundField DataField="HOLE_DIFFICULTY" HeaderText="HOLE_DIFFICULTY" 
                                SortExpression="HOLE_DIFFICULTY" />
                            <asp:BoundField DataField="PAR_NUMBER" HeaderText="PAR_NUMBER" 
                                SortExpression="PAR_NUMBER" />
                            <asp:BoundField DataField="COURSE_NO" HeaderText="COURSE_NO" ReadOnly="True" 
                                SortExpression="COURSE_NO" />
                            <asp:BoundField DataField="HOLE_NO" HeaderText="HOLE_NO" ReadOnly="True" 
                                SortExpression="HOLE_NO" />
                        </Columns>
                        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="sqldsHole" runat="server" 
                        ConflictDetection="CompareAllValues" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM &quot;HOLE&quot; WHERE &quot;COURSE_NO&quot; = :original_COURSE_NO AND &quot;HOLE_NO&quot; = :original_HOLE_NO AND ((&quot;HOLE_NAME&quot; = :original_HOLE_NAME) OR (&quot;HOLE_NAME&quot; IS NULL AND :original_HOLE_NAME IS NULL)) AND ((&quot;HOLE_DIFFICULTY&quot; = :original_HOLE_DIFFICULTY) OR (&quot;HOLE_DIFFICULTY&quot; IS NULL AND :original_HOLE_DIFFICULTY IS NULL)) AND ((&quot;PAR_NUMBER&quot; = :original_PAR_NUMBER) OR (&quot;PAR_NUMBER&quot; IS NULL AND :original_PAR_NUMBER IS NULL))" 
                        InsertCommand="INSERT INTO &quot;HOLE&quot; (&quot;HOLE_NAME&quot;, &quot;HOLE_DIFFICULTY&quot;, &quot;PAR_NUMBER&quot;, &quot;COURSE_NO&quot;, &quot;HOLE_NO&quot;) VALUES (:HOLE_NAME, :HOLE_DIFFICULTY, :PAR_NUMBER, :COURSE_NO, :HOLE_NO)" 
                        OldValuesParameterFormatString="original_{0}" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT &quot;HOLE_NAME&quot;, &quot;HOLE_DIFFICULTY&quot;, &quot;PAR_NUMBER&quot;, &quot;COURSE_NO&quot;, &quot;HOLE_NO&quot; FROM &quot;HOLE&quot;" 
                        UpdateCommand="UPDATE &quot;HOLE&quot; SET &quot;HOLE_NAME&quot; = :HOLE_NAME, &quot;HOLE_DIFFICULTY&quot; = :HOLE_DIFFICULTY, &quot;PAR_NUMBER&quot; = :PAR_NUMBER WHERE &quot;COURSE_NO&quot; = :original_COURSE_NO AND &quot;HOLE_NO&quot; = :original_HOLE_NO AND ((&quot;HOLE_NAME&quot; = :original_HOLE_NAME) OR (&quot;HOLE_NAME&quot; IS NULL AND :original_HOLE_NAME IS NULL)) AND ((&quot;HOLE_DIFFICULTY&quot; = :original_HOLE_DIFFICULTY) OR (&quot;HOLE_DIFFICULTY&quot; IS NULL AND :original_HOLE_DIFFICULTY IS NULL)) AND ((&quot;PAR_NUMBER&quot; = :original_PAR_NUMBER) OR (&quot;PAR_NUMBER&quot; IS NULL AND :original_PAR_NUMBER IS NULL))">
                        <DeleteParameters>
                            <asp:Parameter Name="original_COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_NAME" Type="String" />
                            <asp:Parameter Name="original_HOLE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="original_PAR_NUMBER" Type="Decimal" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="HOLE_NAME" Type="String" />
                            <asp:Parameter Name="HOLE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="PAR_NUMBER" Type="Decimal" />
                            <asp:Parameter Name="COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="HOLE_NO" Type="Decimal" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="HOLE_NAME" Type="String" />
                            <asp:Parameter Name="HOLE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="PAR_NUMBER" Type="Decimal" />
                            <asp:Parameter Name="original_COURSE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_NO" Type="Decimal" />
                            <asp:Parameter Name="original_HOLE_NAME" Type="String" />
                            <asp:Parameter Name="original_HOLE_DIFFICULTY" Type="Decimal" />
                            <asp:Parameter Name="original_PAR_NUMBER" Type="Decimal" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <br />
                    <br />
                    <asp:Button ID="Button1" runat="server" Font-Size="XX-Large" Height="92px" 
                        onclick="Button1_Click" Text="게임 시작" Width="204px" />
                </td>
                <td class="style2">
                    </td>
            </tr>
            <tr>
                <td>
                    내가 받은 쪽지<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:GridView ID="gvMessage" runat="server" AllowPaging="True" 
                        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
                        DataKeyNames="MESSAGE_DATETIME,CHARACTER_NAME,SERVER_NO" 
                        DataSourceID="sqldsMessage" 
                        EmptyDataText="There are no data records to display." ForeColor="#333333" 
                        GridLines="None">
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:CommandField ShowDeleteButton="True" />
                            <asp:BoundField DataField="MESSAGE_DATETIME" HeaderText="MESSAGE_DATETIME" 
                                ReadOnly="True" SortExpression="MESSAGE_DATETIME" />
                            <asp:BoundField DataField="CONTENT" HeaderText="CONTENT" 
                                SortExpression="CONTENT" />
                            <asp:BoundField DataField="CHARACTER_NAME" HeaderText="CHARACTER_NAME" 
                                ReadOnly="True" SortExpression="CHARACTER_NAME" Visible="False" />
                            <asp:BoundField DataField="SERVER_NO" HeaderText="SERVER_NO" ReadOnly="True" 
                                SortExpression="SERVER_NO" Visible="False" />
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                    <br />
                    <br />
                    <br />
                    <asp:SqlDataSource ID="sqldsMessage" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                        DeleteCommand="DELETE FROM &quot;MESSAGE&quot; WHERE &quot;MESSAGE_DATETIME&quot; = :MESSAGE_DATETIME AND &quot;CHARACTER_NAME&quot; = :CHARACTER_NAME AND &quot;SERVER_NO&quot; = :SERVER_NO" 
                        InsertCommand="INSERT INTO &quot;MESSAGE&quot; (&quot;CONTENT&quot;, &quot;MESSAGE_DATETIME&quot;, &quot;CHARACTER_NAME&quot;, &quot;SERVER_NO&quot;) VALUES (:CONTENT, :MESSAGE_DATETIME, :CHARACTER_NAME, :SERVER_NO)" 
                        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                        SelectCommand="SELECT CONTENT, MESSAGE_DATETIME, CHARACTER_NAME, SERVER_NO FROM MESSAGE WHERE (SERVER_NO = :SERVER_NO) AND (CHARACTER_NAME = :CHARACTER_NAME) ORDER BY MESSAGE_DATETIME DESC" 
                        
                        UpdateCommand="UPDATE &quot;MESSAGE&quot; SET &quot;CONTENT&quot; = :CONTENT WHERE &quot;MESSAGE_DATETIME&quot; = :MESSAGE_DATETIME AND &quot;CHARACTER_NAME&quot; = :CHARACTER_NAME AND &quot;SERVER_NO&quot; = :SERVER_NO">
                        <SelectParameters>
                            <asp:SessionParameter Name="SERVER_NO" SessionField="SERVER" />
                            <asp:SessionParameter Name="CHARACTER_NAME" SessionField="CHARACTER_NAME" />
                        </SelectParameters>
                        <DeleteParameters>
                            <asp:Parameter Name="MESSAGE_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CONTENT" Type="String" />
                            <asp:Parameter Name="MESSAGE_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="CONTENT" Type="String" />
                            <asp:Parameter Name="MESSAGE_DATETIME" Type="DateTime" />
                            <asp:Parameter Name="CHARACTER_NAME" Type="String" />
                            <asp:Parameter Name="SERVER_NO" Type="Decimal" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
